package com.acme.bankapp.service.bank;

import com.acme.bankapp.domain.bank.Bank;
import com.acme.bankapp.domain.bank.CheckingAccount;
import com.acme.bankapp.domain.bank.Client;
import com.acme.bankapp.domain.bank.Gender;
import com.acme.bankapp.domain.bank.SavingAccount;

public class BankApplication {
	public static void main(String[] args) {
		Client[] clients = createTestClientArray();
		
		Bank bank = new Bank(clients);

		BankService.printBalance(bank);
				
		BankService.printMaximumAmountToWithdraw(bank);
		
		BankService.modifyBank(bank);
		
		BankService.printBalance(bank);
		
		BankService.printMaximumAmountToWithdraw(bank);
		
	}

	/**
	 * creating simplest array of clients
	 * */
	private static Client[] createTestClientArray() {
		return new Client[]{
			new Client("Peter", Gender.MALE, new CheckingAccount(100, 50)),
			new Client("Ann", Gender.FEMALE, new SavingAccount(500))
		};
	}


}
